/**
 * Created by bianbian3 on 2018/8/29.
 */

import React, { Component, PropTypes } from 'react';
import { View, StyleSheet, TouchableHighlight, Dimensions, Text, Switch } from 'react-native';
import { MtChar, MtCheckItem, MtColor } from 'martian-ui';
const { MtM1, MtT3 } = MtChar;

import BoxShadowYaGuan from '../../components/common/BoxShadowYaGuan';
const { width, height } = Dimensions.get('window');
import { BoxShadow } from 'react-native-shadow'
class AlarmLabelBar extends Component {
    constructor(props) {
        super(props)
        this.state = {
            switchValue:this.props.value || false,
        }
    }

    render() {

        const { title, barWidth,barHeight, rightValue, containerStyle } = this.props;
        const { switchValue } = this.state;

        return (
            <View style={[{ flex: 1, alignItems:'center'}, containerStyle]}>
                <BoxShadowYaGuan

                    width={barWidth}
                    height={barHeight}
                    renderItem={()=>{
                        return (
                            <View style={[styles.power, styles.flex]}>
                                <View style={{ width:4, height: 4, borderRadius:4, backgroundColor:'red'}}>
                                </View>
                                <Text style={styles.powerText}>{title}</Text>
                            </View>
                        )
                    }}
                />
            </View>

        );
    }
}

const styles = StyleSheet.create({
    flex: {
        paddingLeft: 20,
        paddingRight: 20,
    },
    senerState: {
        height: 180,
        width: width - 30,
        justifyContent: 'center',
        backgroundColor: '#fff',
        borderRadius: 4,
        paddingHorizontal: 15,
        paddingVertical: 20,
    },
    powerText: {
        fontSize: 14,
        color: '#444444',
        marginLeft: 10,
        flex:1,
    },

    power: {
        height: 68,
        width: width - 30,
        backgroundColor: '#fff',
        borderRadius: 6,
        flexDirection:'row',
        alignItems: 'center',
        flex:1,
    },
    senerList: {
        height: 390,
        width: width - 30,
        backgroundColor: '#fff',
        borderRadius: 4,
        paddingHorizontal: 15,
        paddingVertical: 20,
    },
});

module.exports = AlarmLabelBar;
